package cn.itlaobing.service.impl;

import cn.itlaobing.dao.StationDao;
import cn.itlaobing.model.Station;
import cn.itlaobing.model.StationDto;
import cn.itlaobing.service.StationService;

import java.sql.SQLException;
import java.util.List;

/**
 * Created by xuaner on 2017/11/10.
 */
public class StationServiceImpl implements StationService {
    @Override
    public StationDto authentication(String trainNum, String station1, String station2) {
        StationDao stationDao=new StationDao();
        StationDto stationDto=null;
        try {
            stationDto=stationDao.query(trainNum,station1,station2);
        } catch (SQLException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
            return null;
        }
        return stationDto;
    }
}

